#include <stdio.h>
#include <math.h>
#define debug false

double pi = acos(-1);
double plist[10001];
int n, frd;
double ans, lt, rt, mid;

inline void in()
{
    int i;
    scanf("%d%d", &n, &frd);
    frd++;
    lt = rt = 0;
    for (i=0; i<n; ++i)
    {
        scanf("%lf", &plist[i]);
        plist[i] = plist[i]*plist[i]*pi;
        if (rt<plist[i]) rt = plist[i];        
    }    
}   
inline int testput(double & x)
{
    int i, tot=0;
    for (i=0; i<n; ++i)
        tot += (int)floor(plist[i]/x);
    return tot;
}     
void deal()
{
    int i;
    ans = 0;
    while (lt+1e-3<rt)
    {
        mid = (lt+rt)/2;
        i = testput(mid);
        if (i>=frd && ans < mid) ans = mid;
        if (i>=frd) lt = mid;        
        else rt = mid;
    }        
}    

int main()
{
    int icase;

    scanf("%d", &icase);
    while (icase--)
    {
        in();
        deal();
        printf("%lf\n", ans);
    }    
    
    
    return 0;    
}
    